<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');?>
<link rel="stylesheet" href="<?php echo JS_PATH?>viewerjs/dist/viewer.min.css">
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>viewerjs/dist/viewer.min.js" charset="UTF-8"></script>
<div class="subnav">
  <h2 class="title-1 line-x f14 fb blue lh28"><a href="?m=sign_up&c=reg&a=reg_statistics&res_id=<?=$id?>" style="font-size:14px;color: #0000FF"><em>返回上一级</em></a>
  </h2>
</div>
<div class="pad-lr-10">
<div class="table-list">
    <table width="100%" cellspacing="0" >
        <thead>
            <tr>
      <th width="50">ID</th>
      <th width="100"><?php echo L('reg_title');?></th>
            <th width="100"><?php echo L('column_name');?></th>
            <th width="400"><?php echo L('user_column_value');?></th>
            <!-- <th width="100"><?php echo L('uniq_id');?></th> -->
            <th width="150"><?php echo L('create_time');?></th>
            <th width="50" align='center'><?php echo L('operations_manage');?></th>
            </tr>
        </thead>
    <tbody class="td-line">
  <?php
  foreach($datas as $r) {
  ?>
    <tr>
    <td align='center'><?php echo $r['id']?></td>
    <td align='center'><?php echo $r['table_info_name']?></td>
    <td align='center'><?=$r['column_name']?></td>
    <td align='center' style="word-break:break-all;">
        <?php if($r['column_type'] == 7){?>
            <?php if (empty($r['user_column_value'])){echo '<font color="red">（未设置）</font>';}else{ ?> 
            <div id="jq22">       
                <?php foreach ($r['user_column_value'] as $v) {?>
                <span><img src="<?=$v?>" height="60"></span>
                <?php }?>
            </div>
            <?php }?>
        <?php }else if($r['column_type'] == 5 || $r['column_type'] == 8){?>
        <a href="<?=$r['user_column_value'][0]?>" target="_blank"><?=$r['user_column_value'][0]?></a>
        <?php }else {?>
        <?php echo $r['user_column_value']?$r['user_column_value']:'<font color="red">（未设置）</font>';}?>
    </td>
    <!-- <td align='center'><?php echo $r['uniq_id']?></td> -->
    <td align='center'><?=$r['create_time']?></td>
    <td align='center'>
        <?php if ($r['column_type'] != 7 && $r['column_type'] != 5 && $r['column_type'] != 8 && $r['column_type'] != 9 && $r['column_type'] != 10){?>
        <a href="javascript:edit('<?php echo $r['id']?>','<?php echo addslashes($r['column_name']);?>')"><span style="color:blue;">修改</span></a>
        <?php } else {?>
        <span style="color:#ccc;">不可修改</span>
        <?php }?>  
    </td>
  </tr>
  <?php } ?>
    </tbody>
    </table>
</div>
<script type="text/javascript">
    $('#jq22').viewer();
    function edit(id, name) {
        window.top.art.dialog({id:'edit'}).close();
        window.top.art.dialog({title:'修改《'+name+'》',id:'edit',iframe:'?m=sign_up&c=reg&a=reg_log_edit&id='+id,width:'660',height:'300'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;d.document.getElementById('dosubmit').click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
    }
</script>
</body>
</html>
